package com.ys.erp.stage_pet_service.controller;

import com.ys.erp.framework.annotation.CheckEmpLogin;
import com.ys.erp.framework.annotation.ResponseResult;
import com.ys.erp.framework.annotation.StageLoginEmp;
import com.ys.erp.framework.bean.dto.StageEmpDTO;
import com.ys.erp.framework.response.PageDTO;
import com.ys.erp.stage_pet_service.bean.condition.ProcurementCondition;
import com.ys.erp.stage_pet_service.bean.vo.ProcurementVo;
import com.ys.erp.stage_pet_service.service.PurchaseService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zjj
 * @date 2025/07/03 19:54
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/manage/pet/purchase")
@Tag(name = "后台用户采购运输相关接口", description = "后台用户采购运输相关接口")
@ResponseResult
public class PurchaseController {
    public  final  PurchaseService purchaseService;

    @PostMapping("/ProcurementTransportation")
    @Operation(summary = "分页采购运输", description = "分页采购运输")
    @CheckEmpLogin
    public PageDTO<ProcurementVo> ProcurementTransportation(@RequestBody @Valid ProcurementCondition.ProcurementCon con,
                                                            @StageLoginEmp StageEmpDTO empDto) {
        return purchaseService.ProcurementTransportation(empDto, con);
    }
}
